namespace OrbitOne.CRM
{
    public class Ticket
    {
        #region Constructor
        public Ticket(string ticket, string instance, string url, string metaurl, AuthenticationType authenticationType)
        {
            this.CrmTicket = ticket;
            this.Instance = instance;
            this.ServiceUrl = url;
            this.MetadataServiceUrl = metaurl;
            this.AuthenticationType = authenticationType;
        } 
        #endregion

        #region Properties
        /// <summary>
        /// The name of the crm instance (example https://crm.orbitone.com/ will return instance eicrm)
        /// </summary>
        public string Instance { get; private set; }
        /// <summary>
        /// The CrmTicket. This string is needed to create CRM Service (v4.0)
        /// </summary>
        public string CrmTicket { get; private set; }
        /// <summary>
        /// The service Url. This will return the config file's Url concatenated with "/mscrmservices/2007/CrmService.asmx"
        /// </summary>
        public string ServiceUrl { get; private set; }
        /// <summary>
        /// The authentication type. AD, SPLA or Passport
        /// </summary>
        public AuthenticationType AuthenticationType { get; private set; }
        /// <summary>
        /// The metadataservice url. This will return the config file's Url concatenated with "/mscrmservices/2007/MetadataService.asmx"
        /// </summary>
        public string MetadataServiceUrl { get; private set; }
        #endregion
    }
}